package MyApp::Controller::Bar;

use strict;
use warnings;
use base 'Catalyst::Controller';

=head1 NAME

MyApp::Controller::Bar - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut


=head2 index 

=cut


sub start : Chained('/') PathPart('bar') CaptureArgs(1) {
    my ( $self, $c, $arg ) = @_;
warn "ARGS $arg \n";# "111" in "/bar/111/guu/222"
}

sub que : Chained('start') Args(1) {
    my ( $self, $c, $arg ) = @_;

    $c->response->body('Matched MyApp::Controller::Bar in Bar. quuueeee '.$arg );
}

#sub fun : Chained('start') PathPart('guu') Args(1) {
sub fun : Chained('start') PathPart('guu') {
    my ( $self, $c, $arg ) = @_;
    $arg;# "222" in "/bar/111/guu/222"

    $c->response->body('Matched MyApp::Controller::Bar in Bar. fuuuunn guuu '.$arg );
}

=head1 AUTHOR

竹田 昭仁

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
